package week6.day37;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Author fengzihao
 * @Date 2024-05-21 19:44
 */
public class ReturnSquareList {
    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1, 2, 3, 4, 5);
        List<Integer> squareList = list.stream().map(Integer -> Integer * Integer).collect(Collectors.toList());
        System.out.println("squareList = " + squareList);
    }
}
